package com.test.work.shengang;

import java.nio.charset.StandardCharsets;
import java.util.Base64;

/**
 * @Classname ShengangDecoder
 * @Description TODO
 * @Date 2025/2/7 17:25
 * @Created by rgs
 */
public class ShengangEncoder {

    public static void main(String[] args) {

        String s = "{\n" +
                "    \"goBackUrl\": \"http://10.188.133.15:3007/#/subpackages/prispcollection/pages/trade/buy/buyContract/buyContract?flowCode=17389185096661079\",\n" +
                "    \"productCode\": \"011010\",\n" +
                "    \"flowCode\": \"17389185096661079\",\n" +
                "    \"routePage\": \"1\",\n" +
                "    \"riskMatchFlg\": \"1\",\n" +
                "    \"appId\": \"NzIyNjA0NTA2NDI4MzQ2MzY5\",\n" +
                "    \"sign\": \"16869CE9C7BB394994755B364586ED20\",\n" +
                "    \"agree\": \"1\",\n" +
                "    \"customerNo\": \"508402\",\n" +
                "    \"tradeUrl\": \"http://10.188.133.15:3007/#/subpackages/prispcollection/pages/trade/buy/buyContract/buyContract?flowCode=17389185096661079\",\n" +
                "    \"timestamp\": \"1738922180096\",\n" +
                "    \"extInfo\": \"{\\\"investRiskTolerance\\\":\\\"3\\\",\\\"productRiskLevel\\\":\\\"1\\\",\\\"pubProfessionalInvestorFlag\\\":\\\"0\\\",\\\"templateIds\\\":[\\\"sgzq-00000010\\\",\\\"20231025513160\\\",\\\"10000123\\\"],\\\"timestamp\\\":\\\"1738918509682\\\"}\"\n" +
                "}";


        String bainma = new String(Base64.getEncoder().encode(s.getBytes(StandardCharsets.UTF_8)), StandardCharsets.UTF_8);
        System.out.println(bainma);


        String url = "https://zgzx.jfplsq.top:10443/shengangmobile/entry?clientParam="+bainma;

        System.out.println();
        System.out.println(url);

    }


}